<template>
  <div class="container">
    <div class="wxkj-tab mt15 mb15">
      <el-tabs v-model="state" @tab-click="tabSwitch">
        <el-tab-pane label="新简历" name="0" />
        <el-tab-pane label="初筛" name="3" />
        <el-tab-pane label="面试" name="4" />
        <el-tab-pane label="录用" name="5" />
        <el-tab-pane label="已入职" name="6" />
      </el-tabs>
    </div>

    <personnel-view ref="personnel" :from="'ADMIN_候选人'" :components="true" :state="state" :job-id="jobId" :job-name="jobName" />
  </div>
</template>

<script>
import personnelView from '@/views/special-session/components/personnel'
export default {
  name: '',
  components: { personnelView },
  props: {},
  data() {
    return {
      state: '0',
      jobId: '',
      jobName: ''
    }
  },
  // 生命周期 - 创建完成（可以访问当前this实例）
  created() {
    const params = this.$route.params
    if (params.id) {
      this.state = params.state.toString()
      this.jobId = params.id
      this.jobName = params.jobName
    }
  },
  // 生命周期 - 挂载完成（可以访问DOM元素）
  mounted() {},
  // 销毁
  destroyed() {},
  // 方法
  methods: {
    tabSwitch() {
      this.$refs.personnel.pageInitList(this.state)
    }
  }
}
</script>
<style lang="scss" scoped>
</style>
